package com.example.comment_oa.pojos;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.example.comment_oa.converters.SexConverters;
import com.example.comment_oa.converters.StateConverters;
import lombok.Data;
import lombok.NonNull;

import java.io.Serializable;
import java.util.List;

/**
 * 
 * @TableName sys_user
 */
@TableName(value ="sys_user")
@Data
public class SysUser implements Serializable {
    /**
     * 用户id
     */

    @TableId(type = IdType.AUTO)
    @ExcelProperty("用户ID")
    private Integer userId;

    /**
     * 员工id外键
     */
    @ExcelIgnore
    private Integer empId;

    /**
     * 用户电话
     */
    @ExcelProperty("用户电话")
    @ColumnWidth(15)
    private String userPhone;

    /**
     * 用户账号
     */
    @ExcelProperty("用户账号")
    @ColumnWidth(15)
    private String userNo;

    /**
     * 用户密码
     */
    @ExcelIgnore
    private String userPassword;

    /**
     * 用户头像
     */
    @ExcelIgnore
    private String userImg;

    /**
     * 用户状态（1：正常，2：失效）
     */
    @ExcelProperty(value = "状态", converter = StateConverters.class)
    private Integer userState;

    /**
     * 用户昵称
     */
    @ExcelProperty("用户昵称")
    @ColumnWidth(15)
    private String userName;

    @ExcelIgnore
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @TableField(exist = false)
    @ExcelIgnore
    private SysEmployee sysEmployee;

    @TableField(exist = false)
    @ExcelIgnore
    private List<SysUserRole> sysUserRole;

}